﻿#ifndef __SCORE_H__
#define __SCORE_H__
#include"Entity.h"
class Sprite;
class Score :public Entity
{
public:
	//Score()=default;
	Score(const QRect& rect=QRect(5,5,100,50), qreal xRadius = 15, qreal yRadius = 15);
	~Score();
	void update();
	void draw(QPainter* painter);
	//设置玩家
	void setPlayer(Sprite* player);
	//设置文字字体和颜色
	void setNumTextPen(const QPen& pen);
	void setNumTextFont(const QFont& font);
	//设置矩形Pen
	void setRectPen(const QPen& pen);
private:
	Sprite* m_player = nullptr;
	QPen  m_RectPen;
	QRect m_rect;//矩形
	qreal m_xRadius;
	qreal m_yRadius;

	QPen  m_NumPen;
	QFont m_NumFont;
};

#endif // !__MESSAGE_H__